import Vue from 'vue';

import Vuex from 'vuex';

import modules from "../store/modules/index"

Vue.use(Vuex);
const state = {
    get UserToken(){
        return localStorage.getItem("token");
    },
    set UserToken(value){
        localStorage.setItem("token",value);
    }
}
const mutations={
    LOGIN_IN(state,value){
        state.UserToken=value;
    },
    LOGIN_OUT(state){
        state.UserToken="";
    }
}
export default new Vuex.Store({
    state,
    mutations,
    modules: modules
    
});